#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include<QPropertyAnimation>

namespace Ui {
class btForm;
}

class btForm : public QWidget
{
    Q_OBJECT

public:
    void setIconAndText(const QString& btIcon,const QString btText,int pageId);//将左边栏的按钮和右边页面一一对应起来
    explicit btForm(QWidget *parent = nullptr);

    ~btForm();
    //获取页码
    int getpageId()const;
    //清除点击左侧边栏的颜色
    void clearBackground();
    //显示动画效果
    void showAnimal(bool isShow);
signals:
    void btClick(int pageId );
protected:
    void mousePressEvent(QMouseEvent *event);
private:
    Ui::btForm *ui;
    int pageId;
    QPropertyAnimation *animationLine1;
    QPropertyAnimation *animationLine2;
    QPropertyAnimation *animationLine3;
    QPropertyAnimation *animationLine4;
};

#endif // BTFORM_H
